﻿/*
* 时间：2019年7月 
* 作者：潘意
*/
using System;
using System.Collections.Generic;
using EMRView.Extensions.Command;

namespace EMRView.Extensions.HCAttribute
{
    [Serializable]
    public class CommandAttribute : Attribute
    {
        private CommandType _commandType = CommandType.默认;
        /// <summary>
        /// 命令类型
        /// </summary>
        public CommandType CommandType
        {
            get
            {
                return _commandType;
            }
            set
            {
                _commandType = value;
            }
        }
        private string _commandName;

        /// <summary>
        /// 命令名字
        /// </summary>
        public string CommandName
        {
            get
            {
                return _commandName;
            }
            set
            {
                _commandName = value;
            }
        }

        private string _commandExplain;

        /// <summary>
        /// 命令说明
        /// </summary>
        public string CommandExplain
        {
            get
            {
                return _commandExplain;
            }
            set
            {
                _commandExplain = value;
            }
        }

        private List<Type> _bindControlTypes = null;
        /// <summary>
        /// 绑定控件类型列表
        /// </summary>
        public List<Type> BindControlTypes
        {
            get
            {
                return _bindControlTypes;
            }
            set
            {
                _bindControlTypes = value;
            }
        }

        public CommandAttribute(CommandType commandType)
        {
            CommandType = commandType;
        }

        public CommandAttribute(CommandType commandType, string commandName, string commandExplain)
        {
            CommandType = commandType;
            CommandName = commandName;
            CommandExplain = commandExplain;
            //BindControlTypes = bindControlTypes;
        }
    }
}
